Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/kconfig: Add design patterns for kconfig #17556

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MrKevinWeiss
Copy link
Contributor

@MrKevinWeiss MrKevinWeiss commented Jan 24, 2022

Contribution description

  • Adds some rule of thumb statements with some reasoning why
  • Adds a number of generic examples as well as read examples of design patterns used for kconfig.

Testing procedure

Issues/PRs references

@MrKevinWeiss MrKevinWeiss added the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Jan 24, 2022
@github-actions github-actions bot added the Area: doc Area: Documentation label Jan 24, 2022
@leandrolanzieri leandrolanzieri added the TF: Config Marks issues and PRs related to the work of the Configuration Task Force label Jan 24, 2022
@MrKevinWeiss
Copy link
Contributor Author

MrKevinWeiss commented Jan 25, 2022

TODO

  • Add patterns for multiple backends
  • Add more real examples
  • Review and come up with pattern for stdio dependency modelling
  • Say something about select is now preferred, opposed to linux and zephyr, so that applications will not require different configs for each hardware configuration
  • circular dependencies

@MrKevinWeiss MrKevinWeiss force-pushed the pr/kconfig/designpatterns branch from 9d41486 to e90806a Compare January 25, 2022 12:05
@MrKevinWeiss MrKevinWeiss changed the title Kconfig design patterns docs/kconfig: Add design patterns for kconfig Jan 25, 2022
@MrKevinWeiss MrKevinWeiss force-pushed the pr/kconfig/designpatterns branch from e90806a to 07e1dad Compare January 25, 2022 12:14
@MrKevinWeiss
Copy link
Contributor Author

It seems pretty unpleasant to link separate kconfig files from the docs... My current solution will be adding a commit after everything is rebased and squashed to point to the commit hashes of the linked kconfig files. This must happen at the end though.

@MrKevinWeiss
Copy link
Contributor Author

oops

@MrKevinWeiss
Copy link
Contributor Author

Note, if there are no configurable options for a driver level module then it can be config not menuconfig as to not confuse a kconfig user into thinking there may be more options available.

@MrKevinWeiss
Copy link
Contributor Author

TODO:

Add something about board specific configs and overriding configs. Adding hardcoded modules to a $(BOARD).config and modules that require dependencies to the board Kconfig with an overriding config (or choice), keeping in mind that the depends on * must be duplicated for the config only.

@MrKevinWeiss
Copy link
Contributor Author

Now that all the boards are in, it would be good to settle on this.

Before the big push in the networking I would like this, and an update based on this (possibly some treewide updates).

@stale
Copy link

stale bot commented Sep 21, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@jue89
Copy link
Contributor

jue89 commented Oct 27, 2022

What's the current state of this documentation? Is this ready to be reviewed? I cloud do a try to understand what you're describing and point out what's unclear to me review.

@MrKevinWeiss
Copy link
Contributor Author

Hmmm, I have something of a chicken and egg problem with the current state, I want the links to work but they won't until it is in.

Let me have another go at it (once I am done trying to fix the nightlies). I will ping you sometime next week when I will be ready... That is unfortunately the speed that I work.

@jue89
Copy link
Contributor

jue89 commented Oct 27, 2022

Oh don't worry - I really don't want to put any pressure onto you. Take the time you need.

I'm just keen to get Kconfig in - doing all the dependency modeling twice for every bit you add or change is good advertisement to move to only one dependency system ... and I'd say Kconfig is the better choice here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet TF: Config Marks issues and PRs related to the work of the Configuration Task Force
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants